<template>
  <el-dialog
    title="客户注销"
    :visible.sync="dialogVisible"
    width="30%"
    :before-close="handleClose"
  >
    <el-form ref="dataForm" label-position="right" label-width="80px">
      <!-- <el-form-item>
        <label slot="label">备注</label>
        <el-input disabled />
      </el-form-item> -->
      <el-form-item label-width="80px" label="销户原因" prop="remark">
        <el-input v-model="remark" type="textarea" :rows="3" maxlength="255" show-word-limit />
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="success">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script>
  export default {
    name: 'xiaohu',
    props: {
      xiaoHuFn: {
        type: Function
      }
    },
    data() {
      return {
        dialogVisible: false,
        remark: null
      }
    },
    methods: {
      open(temp) {
        this.query = { ...temp }
        this.dialogVisible = true
      },
      success() {
        // invalidStr
        const params = { ...this.query, invalidStr: this.remark }
        // console.log(this.$parents)
        console.log(this.xiaoHuFn)
        this.xiaoHuFn(params)
        this.remark = null
        this.dialogVisible = false
      },
      handleClose(done) {
        // this.$confirm('确认关闭？')
        //   .then(_ => {
        //     done()
        //   })
        //   .catch(_ => {})
      }
    }
  }

</script>
